package cn.imvc.app.repositories;

import java.util.List;

import org.springframework.data.jpa.repository.JpaRepository;

import cn.imvc.app.entities.Address;
import cn.imvc.app.entities.Member;
import cn.imvc.data.jpa.repository.IJpqlExecutor;

public interface AddressRepository extends JpaRepository<Address, Integer>, IJpqlExecutor<Address> {
	
	public List<Address> findByMemberIdOrderByIsDefaultDesc(int memberid);
	public List<Address> findByIsDefaultAndMember(Byte isDefault, Member member);
	public List<Address> findByMember(Member member);
	public Address findByMemberAndIsDefault(Member member, byte isDefault);
	public Address findByMemberAndId(Member member, Integer id);
}
